home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Utilities / Winter Shell 1.0d2 / Source / Libraries / #Headers / GlobalLib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-13  |  746 b   |  24 lines  |  [TEXT/KAHL]

  1. /* Use these functions as you would THINK C's SetUpA4 functions. The advantage
  2.     is that these will work whether you're writing an application or a code
  3.     resource. */
  4.     
  5. #pragma once
  6.  
  7. #if APPLICATION
  8.     /* define SetCurrentA5 and SetA5 without including OSUtils.h */
  9.     long _SetCurrentA5(void) = {0x200D,0x2A78,0x0904}; 
  10.     #pragma parameter __D0 _SetA5(__D0)
  11.     long _SetA5(long newA5) = 0xC18D; 
  12.     #define GlobalInit()
  13.     #define GlobalRemember()    
  14.     #define GlobalSetup()        { long _register = _SetCurrentA5();
  15.     #define GlobalRestore()        ((void) _SetA5(_register)); }
  16. #elif THINK_C
  17.     #include <SetUpA4.h>
  18.     #define GlobalInit()            RememberA0()
  19.     #define GlobalRemember()    RememberA4()
  20.     #define GlobalSetup()        SetUpA4()
  21.     #define GlobalRestore()        RestoreA4()
  22. #endif
  23.  
  24.